package com.cmc.cloud.cmclink.doc.vo.rejectreasonvo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;

/**
 * 常用订舱拒绝理由 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RejectReasonBaseVO {

    @Schema(description = "排序号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{RejectReasonBaseVO.sortNo.NotBlank}")
    @Pattern(regexp = "^\\d{1,5}$", message = "{RejectReasonBaseVO.sortNo.Pattern}")
    private String sortNo;

    @Schema(description = "理由类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotBlank(message = "{RejectReasonBaseVO.reasonType.NotBlank}")
    @Length(max = 50, message = "{RejectReasonBaseVO.reasonType.Length}")
    private String reasonType;

    @Schema(description = "拒绝理由中文描述", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{RejectReasonBaseVO.descCn.NotBlank}")
    @Length(max = 200, message = "{RejectReasonBaseVO.descCn.Length}")
    private String descCn;

    @Schema(description = "拒绝理由英文描述", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{RejectReasonBaseVO.descEn.NotBlank}")
    @Length(max = 200, message = "{RejectReasonBaseVO.descEn.Length}")
    private String descEn;

    @Schema(description = "是否禁用", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{RejectReasonBaseVO.enable.NotNull}")
    private Boolean enable;

}
